package com.example.demo.nosql.config;

import org.noear.redisx.RedisClient;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;
import org.noear.solon.cache.jedis.RedisClientSupplier;

/**
 * @author airhead
 */
@Configuration
public class RedisConfig {
  //  @Bean(typed = true)
  //  public CacheService defaultCache(@Inject("${demo.redis}") RedisCacheService cacheService) {
  //    cacheService.enableMd5key(false);
  //    return cacheService;
  //  }

  @Bean(typed = true)
  public RedisClient defaultClient(
      @Inject("${demo.redis}") RedisClientSupplier redisClientSupplier) {
    return redisClientSupplier.get();
  }
}
